.video-avatar {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    user-select: none;
    background: #000;

    &::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        transition: opacity 0.4s;
    }

    &:hover::after {
        opacity: 1;
    }

    &.is-small {
        border-radius: 6px;
    }
}

.video-avatar-holder,
.video-avatar-video {
    position: relative;
    width: 100%;
    height: 100%;
}

.video-avatar-image-container {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    background: #1a1e21;
}

.video-avatar-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    object-fit: cover;
}

.video-avatar-image-blur-bg {
    width: 100%;
    height: 100%;
    background-color: #1a1e21;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    filter: blur(16px) brightness(0.4);

    &.no-filter {
        filter: none;
    }
}

.video-avatar-bottom {
    position: absolute;
    z-index: 10;
    left: 8px;
    right: 4px;
    bottom: 4px;
    display: flex;
    align-items: flex-end;
}

.video-avatar-user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
    white-space: nowrap;
    margin: 0 5px 0 0;
    padding: 0;
    font-size: 14px;
    font-weight: normal;
    line-height: 1;
    color: #fff;
    user-select: none;
}

.video-avatar-chat-slot {
    position: absolute;
    z-index: 100;
    left: 4px;
    right: 4px;
    bottom: 4px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: 100%;

    .chat-messages-box {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }
}

.video-avatar-media-ctrl {
    margin-left: auto;
    display: flex;

    &.is-portal {
        pointer-events: all;
    }
}

.video-avatar-media-ctrl-btn {
    display: inline-flex;
    overflow: hidden;
    width: 32px;
    height: 32px;
    margin: 0 0 0 4px;
    padding: 0;
    border: none;
    outline: none;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;

    &.is-small {
        width: 24px;
        height: 24px;
        margin-left: 8px;
    }

    &.is-muted {
        color: rgba(255, 255, 255, 0.35);
    }

    &:disabled {
        cursor: not-allowed;
    }

    &.is-muted:disabled {
        color: var(--danger);
    }
}

.video-avatar.is-small {
    .video-avatar-image {
        width: 48px;
        height: 48px;
        top: 40%;
    }

    .video-avatar-user-name {
        font-size: 12px;
    }
}

.video-avatar-holder {
    background: var(--grey-0);
    display: flex;
    align-items: center;
    justify-content: center;

    &::after {
        content: none;
    }
}

.video-avatar-holder-name {
    user-select: none;
    pointer-events: none;
    padding: 0 12px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 16px;
    color: var(--text);
    opacity: .5;
}

.video-avatar-holder.is-drop-target {
    box-shadow: inset 0 0 0 2px var(--primary);
}

.flat-color-scheme-dark {
    .video-avatar-holder {
        background: var(--grey-7);
    }
}